import * as React from 'react';
import {observer} from 'mobx-react'
import styles from './index.scss';
import newImg from '../../../assets/imgs/test/new.png'
import {Carousel} from "antd";

interface IProps {
    openWo: Array<{ info: string }>
}

@observer
class Home extends React.Component<IProps> {

    constructor(props) {
        super(props);
    }

    public static defaultProps = {
        openWo: []
    }

    public render() {
        const {openWo} = this.props
        return (
            <div className={styles.headerLT}>
                <img src={newImg} className={styles.imgLT} />
                <div className={styles.swiperLeftTwoLT}>
                    {
                        openWo.length > 0 &&
                        <Carousel autoplay={true} dots={false} vertical={true} slidesToShow={1} autoplaySpeed={1000}>
                            {
                                openWo.map((item, index) => {
                                    return (
                                        <div key={`itemLeft_${index}`} className={styles.SAddress}>{item.info}</div>
                                    )
                                })
                            }
                        </Carousel>
                    }
                </div>
            </div>
        );
    }
}

export default Home;
